Transaction Safe Nonblocking Data Structures

نویسندگان

  • Virendra J. Marathe
  • Michael F. Spear
  • Michael L. Scott
چکیده

This brief announcement focuses on interoperability of software transactions with ad hoc nonblocking algorithms. Specifically, we modify arbitrary nonblocking operations so that (1) they can be used both inside and outside transactions, (2) external uses serialize with transactions, and (3) internal uses succeed if and only if the surrounding transaction commits. Interoperability enables seemless integration with legacy code, atomic composition of nonblocking operations, and the equivalent of hand-optimized, closed nested transactions. The key to transaction safety is to ensure that memory accesses of operations called from inside a transaction occur (or appear to occur) if, only if, and when the surrounding transaction commits. We do this by making writes manifestly speculative, with their fate tied to that of the transaction, and by logging reads for re-validation immediately before the transaction commits. (Because correct nonblocking code is designed to tolerate races, additional, intermediate validation is not required.) When called from outside a transaction, operations behave as they did in the original nonblocking code, except that they aggressively abort any transaction that stands in their way. Operations inside a transaction similarly abort transactional peers. They are unaware of nontransactional peers. We provide nonblocking objects with “transaction aware” versions of references and other basic primitive types such as integer, long, etc. These provide Get, Set, and CAS operations, which the programmer uses instead of conventional accesses. If called inside a transaction, Get logs the target location for later validation; Set and CAS speculatively modify the target location. Changes become permanent at transaction commit time. If called outside a transaction, all three operations “clean up” any encountered speculative updates, aborting conflicting transactions if necessary. Given correct nonblocking code, the changes required to create a transaction-safe version are mechanical. To make a type transaction-aware, we must be able to distinguish between real and speculative values. For some types (e.g., pointers in C) we may be able to claim an otherwise unused bit, or use features such as runtime type identification in strongly typed languages such as Java. For others we may use a sentinel value to trigger address-based lookup in a separate metadata table. With support for transaction aware primitives, we expect that construction of transaction safe versions of nonblocking algorithms would require little or no

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Nonblocking Algorithms and Preemption-Safe Locking on Multiprogrammed Shared Memory

Most multiprocessors are multiprogrammed to achieve acceptable response time and to increase their utilization. Unfortunately, inopportune preemption may significantly degrade the performance of synchronized parallel applications. To address this problem, researchers have developed two principal strategies for a concurrent, atomic update of shared data structures: (1) preemption-safe locking an...

متن کامل

Analysis of Optimistic Concurrency Control Revisited

Ryu and Thomasian have analyzed several varieties of optimistic concurrency control under two assumptions: that the characteristics of a transaction remain constant throughout its execution, and that the proportion of committing transactions is xed (in order to avoid an unrealistic biasing of the transaction mixture). We show how both of these assumptions can be relaxed. First, we allow an abor...

متن کامل

A Nonblocking Atomic Transaction Processing Algorithm with Real-Time Property

Many multiple server systems are now being used for heavily accessed web services. Performance, availability, and real-time transaction processing are important requirements for many of these applications. In this paper, we apply the multi-invariant data structure (MIDS) concept to develop an atomic transaction processing algorithm. We show that our algorithm achieves nonblocking property. It a...

متن کامل

A ‘liub(log,(N))-2’ Resilient Decentralized Commit Protocol

Conclusions In distributed database systems, commit protocols are used to ensure the transaction atomicity. In the presence of failures, nonblocking commit protocols can guarantee the transaction atomicity without blocking the transaction execution. A (resilient) decentralized nonblocking commit protocol (RDCP) is proposed for distributed database systems. This protocol is based on the hypercub...

متن کامل

Relative Performance of Preemption-Safe Locking and Non-Blocking Synchronization on Multiprogrammed Shared Memory Multiprocessors

Most multiprocessors are multiprogrammed to achieve acceptable response time. Unfortunately, inopportune preemption may significantly degrade the performance of synchronized parallel applications. To address this problem, researchers have developed two principal strategies for concurrent, atomic update of shared data structures: (1) preemption-safe locking and (2) non-blocking (lock-free) algor...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007